//
//  ViewController.m
//  BLTimeAxis
//
//  Created by dg on 2025/4/17.
//

#import "ViewController.h"
#import "BLTimeAxis.h"
#import "BLTimeAxisAppearance.h"
#import "BLTimeAxisAppearance+Render.h"
#import "BLTimeAxisData.h"
@interface ViewController ()

@property (nonatomic, strong) BLTimeAxis *axis;

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    // Do any additional setup after loading the view.
    self.view.backgroundColor = [UIColor whiteColor];
    
    CGSize viewSize = CGSizeMake(self.view.frame.size.width, 100);
    
    [BLTimeAxisAppearance renderRuleAppearanceWithDirection:BLAxisDirectionHorizontal];
    
    
    _axis = [[BLTimeAxis alloc] initWithFrame:CGRectMake(0, self.view.frame.size.height/2.0-100, viewSize.width, viewSize.height)];
    
    [self.view addSubview:_axis];
    
    BLTimeAxisData *d1 = [[BLTimeAxisData alloc] init];
    d1.startTimeInterval = 3600;
    d1.duration = 360;
    d1.strokeColor = [UIColor whiteColor];

    [_axis updateWithDataArray:@[d1]];
}


@end
